#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
	vector<int> nums{ 1,2,3,4,5 };
	for (auto& s : nums)
	{
		//s = s * s;
		s=pow(s, 2);
	}
	sort(nums.begin(), nums.end());
	for (auto& s : nums)
	{
		cout << s << " ";
	}
	cout << endl;
	return 0;
}